home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows News 2010 Summer - Disc 1
/
WN_Ete2010_CD1.iso
/
Onglet5
/
Weezo
/
Weezo setup.exe
/
{code_appDir}
/
www
/
res
/
administration
/
config
/
windows.php
< prev
Wrap
PHP Script
|
2010-05-19
|
4KB
|
123 lines
<?php
/**
* Account windows / desktop remote configuration
*
* PHP version 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category NA
* @package NA
* @author Nicolas Bruley / Peer 2 World <contact@weezo.net>
* @copyright 2005-2009 Nicolas Bruley / Peer 2 World
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id:$
* @link http://www.weezo.net
* @since File available since Release 2.0.0
*/
require_once(INCLUDE_DIR.'outputFunctions.php');
// Initialize data
outControlSetData(array(
'language'=>((cfUGetVar('language'))?cfUGetVar('language'):'default'),
'noPopup'=>cfHGetVar('noPopup'),
'windowsAnimation'=>cfHGetVar('windowsAnimation')
));
// Header
if(cfIsAsync()) {
cfAsyncHeader();
}
else {
cfInsertHEAD();
echo '<body onload="init()">';
echo outDivFrame('frame1','id="mainDiv"');
echo '<div class="frame1Header">'.cfCaption('genConfigure').'</div>';
}
// Build languages list
$lngs['default']=cfCaption('genDefault');
foreach (glob(cfAppDocRoot().'/includes/lng/*.php') as $value){
include_once($value);
$short=cfFileWithoutExtension(basename($value));
$lngs[$short]=$w_lng['languageName'];
}
// Display / process controls
$out='';
$out.=outControl('noPopup',dataBoolean,true,false,cfCaption('configNoPopup')).'<br><br>';
$out.=outControl('windowsAnimation',dataBoolean,true,false,cfCaption('configWindowsAnimation'));
foreach ($lngs as $k=>$v)
$lngsDef[]=array(outImage('/includes/lng/'.(($k=='default')?'noFlag':$k).'.gif'),$k,array($v,'<br> '));
//$lngsDef[]=array(false,$k,array(outImage('/includes/lng/'.(($k=='default')?'noFlag':$k).'.gif'),$v));
//array(false,'flash',array(outIcon('flash'),cfCaption('musicCfgFlash').'</td><td>'));
$out.='<br><br>'.cfCaption('configLanguage')."<br> \n";
$out.=outControl('language',dataList,'default',array_keys($lngs),$lngsDef);
if(cfIsAsync()) {
// If data has changed
if(outControlGetData($options)) {
if(isset($options['language'])){
$prev=cfGGetVar('language');
// Existing language required
if(cfMIssetVar('weezoLng'.$options['language'])){
cfGSetVar('language',$options['language']);
unset($_ENV['weezoLng']);
cfLoadLanguage($options['language']);
}
// default (browser) or error
else{
// Try with browser's language
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE'])>1 && cfMIssetVar('weezoLng'.substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2)))
cfGSetVar('language',substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2));
// Else use default language
else
cfGUnsetVar('language');
$options['language']='default';
}
if(cfGGetVar('language')!=$prev) echo cfAsyncXMLJSaction('winMe.reloadDesktop()');
}
foreach ($options as $k=>$v) cfUSetVar($k,$v);
// Single user account: commit to user configuration
if(cfUGetVar('accountType')=='singleUser') {
require_once(INCLUDE_DIR.'resourceConfigFunctions.php');
rcUserSaveValues($options);
}
}
echo $outControlAsyncResponse;
die(cfAsyncFooter());
}
echo $out;
?>
</div>
<script type="text/javascript">
function init(){
winMe.resizeInnerTo(0,actualOffsetBottom(dgi("mainDiv"))+10);
winMe.freezeSize();
}
function asUpdtFunction(dataName,dataValue){
if(dataName=='noPopup'||dataName=='windowsAnimation'){
var win=W;
while(!win.isMainFrame){
try{if(!win.parent || win.parent!=win) win=win.parent else break} catch(e){break}
}
if(win.isMainFrame) win[dataName]=dataValue;
}
}
<?php echo outKeyHandler('D',array('27'=>'winMe.closeMe()'));?>
</script>
</body>